namespace RFIDData.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("Employee")]
    public partial class Employee
    {
        public Employee()
        {
            Cards = new HashSet<Card>();
            Commutes = new HashSet<Commute>();
        }

        [Key]
        public int EmNo { get; set; }

        [StringLength(20)]
        public string Name { get; set; }

        [StringLength(20)]
        public string Department { get; set; }

        [StringLength(20)]
        public string Rank { get; set; }

        [StringLength(20)]
        public string Phone { get; set; }

        public bool? Sex { get; set; }

        [Column(TypeName = "date")]
        public DateTime? HireDate { get; set; }

        [Column(TypeName = "date")]
        public DateTime? FireDate { get; set; }

        [Column(TypeName = "image")]
        public byte[] Image { get; set; }

        public virtual ICollection<Card> Cards { get; set; }

        public virtual ICollection<Commute> Commutes { get; set; }
    }
}
